package com.mallcloud.mall.admin.api.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mallcloud.mall.common.core.model.BaseModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@ApiModel(value = "SysLog", description = "日志")
@Data
@TableName(value = "sys_log", autoResultMap = true)
public class SysLog extends BaseModel {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty("日志编号")
//	@ApiModelProperty(value = "日志编号")
	private Long id;

	/**
	 * {@link com.mallcloud.mall.common.log.util.LogTypeEnum}
	 */
	@NotBlank(message = "日志类型不能为空")
	@ExcelProperty("日志类型（0-正常 9-错误）")
//	@ApiModelProperty(value = "日志类型")
	private String logType;

	@NotBlank(message = "日志标题不能为空")
	@ExcelProperty("日志标题")
//	@ApiModelProperty(value = "日志标题")
	private String title;

	@ExcelProperty("操作ip地址")
//	@ApiModelProperty(value = "操作ip地址")
	private String remoteAddr;

//	@ApiModelProperty(value = "用户代理")
	private String userAgent;

	@ExcelProperty("浏览器")
//	@ApiModelProperty(value = "请求uri")
	private String requestUri;

	@ExcelProperty("操作方式")
//	@ApiModelProperty(value = "操作方式")
	private String method;

	@ExcelProperty("提交数据")
//	@ApiModelProperty(value = "提交数据")
	private String params;

	@ExcelProperty("执行时间")
//	@ApiModelProperty(value = "方法执行时间")
	private Long time;

	@ExcelProperty("异常信息")
//	@ApiModelProperty(value = "异常信息")
	private String exception;

	@ExcelProperty("应用标识")
//	@ApiModelProperty(value = "应用标识")
	private String serviceId;

}
